package abstract1;

public abstract class Animal {//动物类
    private String name;

    public Animal(String name){this.name=name;}

    public  abstract void bark();//动物发出叫声
    public abstract String toString();

    public String getName(){
        return name;

    }
    public void introduce(){

        System.out.print(toString());
        bark();
    }
    }



